#include <stdio.h>

int main(){
//original version
    /*
    int i,c;
    int lim=10;
    char s[lim];
    for(i=0; i<lim-1 && (c=getchar()) != '\n' && c!=EOF;++i)
        s[i]=c;
    s[i]='\0';
     */

    /*
     */
    int i=0,lim=10,c;
    char s[10];

    while( i< lim-1){
        c=getchar();
        if(c==EOF)
            break;
        else if(c=='\n')
            break;
        s[i++]=c;
    }
    s[i]='\0';
    /*
    */
    printf("%s\n",s);
return 0;
}
